package com.linwen.excise.leetcode;

public class _69x的平方根 {
    public static void main(String[] args) {
        System.out.println(mySqrt(1));
    }
    public static int mySqrt(int x) {
        for (int i = 0; i < x; i++) {
            if(i*i<=x&&(i+1)*(i+1)>x){
                return i;
            }
        }
        return 0;
    }
}
